package com.jc.ds.model;

import java.util.Date;

/**
 * system_log_list
 * @author 
 */
public class SystemLogList extends BaseValueObject {
    private Long id;

    /**
     * RECEIVE_JG_PRODUCT : 接收吉贡产品
RECEIVE_H5_ORDER : 接收H5订单
PUSH_H5_PRODUCT : 推送H5商城
PUSH_JG_ORDER : 推送吉贡订单
     */
    private String logType;

    private String logTypeName;

    /**
     * 执行结果 1 成功能  0 失败
     */
    private Integer conclusion;

    /**
     * 执行时间
     */
    private Date createTime;

    /**
     * 错误原因
     */
    private String exceptionMsg;

    private String respText;

    /**
     * 业务数据 例如 交互报文
     */
    private String businessData;

    private String orderStr = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLogType() {
        return logType;
    }

    public void setLogType(String logType) {
        this.logType = logType;
    }

    public String getLogTypeName() {
        return logTypeName;
    }

    public void setLogTypeName(String logTypeName) {
        this.logTypeName = logTypeName;
    }

    public Integer getConclusion() {
        return conclusion;
    }

    public void setConclusion(Integer conclusion) {
        this.conclusion = conclusion;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getExceptionMsg() {
        return exceptionMsg;
    }

    public void setExceptionMsg(String exceptionMsg) {
        this.exceptionMsg = exceptionMsg;
    }

    public String getRespText() {
        return respText;
    }

    public void setRespText(String respText) {
        this.respText = respText;
    }

    public String getBusinessData() {
        return businessData;
    }

    public void setBusinessData(String businessData) {
        this.businessData = businessData;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByLogType(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by log_type asc";
            }else{
                this.orderStr = this.orderStr + ",log_type asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by log_type desc";
            }else{
                this.orderStr = this.orderStr + ",log_type desc";
            }
        }
    }

    public void orderByLogTypeName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by log_type_name asc";
            }else{
                this.orderStr = this.orderStr + ",log_type_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by log_type_name desc";
            }else{
                this.orderStr = this.orderStr + ",log_type_name desc";
            }
        }
    }

    public void orderByConclusion(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by conclusion asc";
            }else{
                this.orderStr = this.orderStr + ",conclusion asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by conclusion desc";
            }else{
                this.orderStr = this.orderStr + ",conclusion desc";
            }
        }
    }

    public void orderByCreateTime(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by create_time asc";
            }else{
                this.orderStr = this.orderStr + ",create_time asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by create_time desc";
            }else{
                this.orderStr = this.orderStr + ",create_time desc";
            }
        }
    }

    public void orderByExceptionMsg(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by exception_msg asc";
            }else{
                this.orderStr = this.orderStr + ",exception_msg asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by exception_msg desc";
            }else{
                this.orderStr = this.orderStr + ",exception_msg desc";
            }
        }
    }

    public void orderByRespText(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by resp_text asc";
            }else{
                this.orderStr = this.orderStr + ",resp_text asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by resp_text desc";
            }else{
                this.orderStr = this.orderStr + ",resp_text desc";
            }
        }
    }

    public void orderByBusinessData(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by business_data asc";
            }else{
                this.orderStr = this.orderStr + ",business_data asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by business_data desc";
            }else{
                this.orderStr = this.orderStr + ",business_data desc";
            }
        }
    }
}